package com.zhihu_lvliangi_android.option.parent;

import com.android.fragment.ProgressFragment;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.zhihu_lvliangi_android.service.MobileApplication;

/**
 * Fragment基础类
 *
 * @author azuryleaves
 * @since 2014-8-21 上午10:17:27
 * @version 1.0
 *
 */
public class BasicFragment extends ProgressFragment implements Response.Listener<Object>{

	@Override
	public void onStop() {
		super.onStop();
		try {
			MobileApplication.getInstance().clientTask.cancelPendingRequests(this.getClass().getName());
		} catch (Exception e) {
		}
	}
	
	@Override
	public void onResponse(Object response, Enum<?> reqId) {
		if (useProgressFragment) {
			setContentShown(true);
			if (response == null) {
				setContentEmpty(true);
			}
		}
		MobileApplication.getInstance().clientTask.cancelLoadingView();
		System.out.println("---response---" + response.toString());
	}

	
	
	

}
